Repository navigation
Say when nothing answers at the AI model's address - #1728
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 16, 2026 19:47
A model address with nothing listening, a host that doesn't resolve or one that never answers ended the run with "The Bot stopped before it finished answering. Try again." on the LangChain harness, and as a provider refusal on the Claude Agent SDK harness. Both now end the run coded OPENBOT_MODEL_UNREACHABLE, saying OpenBot couldn't reach the AI model at its host and port (never the rest of the URL), so the server can add the step that fits its edition.
davidmckayv
force-pushed
the
fix/model-unreachable-message
branch
from
November 16, 2026 20:25
6a03b69 to
fb60bee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
Seen on OpenBot Desktop: the AI model's address was an OpenAI-compatible base URL at
host.docker.internal:48123with nothing listening. The harness log showedopenai.APIConnectionError("All connection attempts failed"), and the conversation said only "The Bot stopped before it finished answering. Try again." Nothing said the model couldn't be reached, or where to change it. On the Claude Agent SDK harness the same address went on as a provider refusal ("Anthropic turned down the request"), which is wrong too: nobody answered.What changes
agent-langgraph-agui): a run whose model call never reached a model (connection refused, host not found, no answer in time: the OpenAI and Anthropic SDKs'APIConnectionError,APITimeoutError, and httpx's connect and timeout errors) now ends with a RUN_ERROR codedOPENBOT_MODEL_UNREACHABLE: "OpenBot couldn't reach the AI model at 127.0.0.1:48123. Check that it's running and the address is right."agent-claude-sdk): Claude Code's own account of the same failures ("API Error: Connection refused …", "Can't reach the API server …", "No internet route …", "Unable to connect to API (…)", "Request timed out …") ends the run the same way, with the same sentence, on both its routes (a Claude Agent SDK Bot, and a built-in Bot on a Claude plan).api/, and the app draws the message in its existing card.Tests (red first)
agent-langgraph-agui/tests/test_tool_protocol.py: the real endpoint and the real OpenAI SDK against a loopback port with nothing listening (with a user and password in the URL that must not appear), and a.invalidhost (DNS failure). Before: RUN_ERROR with no code and "The Bot stopped before it finished answering. Try again." After: the code and the sentence. Plus the timeout class.agent-claude-sdk/tests/test_model_unreachable.py: the real Claude Code this harness ships, through both routes, against a closed port and a.invalidhost. Before:OPENBOT_MODEL_REFUSED. After:OPENBOT_MODEL_UNREACHABLEand the sentence.Known limit
On the Claude Agent SDK harness the sentence takes about three minutes to appear in a chat (measured 178 s refused, 183 s DNS), because Claude Code retries the connection ten times by itself first. Lowering that retry count would also cut its patience for rate limits and overloads, so it stays as is here; the follow-up is the durability item that lets a harness hand the provider's wait to the server. A delegated task's turn is already sent once and answers in seconds.